The invention relates generally to image processing and particularly to techniques for interpolating colors detected by pixel sensors in imaging arrays.
Color imaging arrays may be used in a variety of electronic devices including digital cameras, copiers, scanners and the like. The array may itself be a charge coupled device (CCD), passive pixel sensor (PPS) or an active pixel sensor (APS) array.
Typical red, green, blue (RGB) imaging arrays sense red, green, and blue colors. While it is possible to intersperse a full set of red, green, and blue color sensors in one array, this has been found to be impractical. Thus, various arrangements have been developed to alternate sensors for the necessary colors through the array. Each sensor (in an RGB array) senses either red, green, or blue or in some embodiments, red, green1, green2, and blue. In still other embodiments, cyan, magenta, yellow (CMY) imaging arrays can be utilized. Thus, one sensor may sense a particular color, while an adjacent sensor may sense a different color. Thereafter, it is necessary to interpolate the missing color data for each pixel. Thus, if a given sensor is a red sensor in an RGB system, it may be desirable to interpolate color intensity data values for the green and blue colors at that sensor""s location in order to produce a true representation of the image with sufficient color definition.
One conventional technique for determining an arrangement of pixels in an imaging array is called the Bayer pattern or the Bayer matrix. A pre-determined number of color sensors are arranged in what may be called a tile. A tile may be provided for each of three colors, e.g., red, green, and blue (as well as for green1 and green2 if desired). The Bayer pattern distributes the sensors for each color through the tile in a way that improves the interpolation process.
A variety of color interpolation techniques have been utilized. One problem with these techniques is that they may require relatively complex mathematical calculations which require correspondingly complex hardware implementations. This means that the imaging system is generally cumbersome and the speed of operation may be slow.
Thus, there is a continuing need for a color interpolation system with reduced computational complexity.
In accordance with one embodiment, a method of analyzing image data from an array of pixel sensors includes calculating color intensity gradients between data from a center pixel sensor for a first color and sensors for the first color spaced from the center pixel sensor. A minimum gradient is then determined for a plurality of pixel gradients.
In accordance with another embodiment, a method of interpolating color values includes calculating color intensity gradients between data from a center pixel sensor for a first color and a pixel for the first color spaced from the center pixel sensor. The gradients are compared to a threshold value. If a gradient exceeds the threshold for that color, the intensity value of the center pixel sensor is used for a pixel spaced from said center pixel sensor.